package org.cytoscape.myapp.cytoscape_app_v1.internal.grupos;

import java.util.List;

public class CriterioVariable extends Criterio {

	
	public CriterioVariable(Comparador comparador, String nombre, FactoryInterface constructorComp){
		super(comparador,nombre,constructorComp);
	
	}
	
	public int esValido(List<Object> nodeList){
		List<NodeAttribute> nodeAttr = this.convertNodeListAttributes(nodeList);
		int cont = 0;
		for(NodeAttribute attr:nodeAttr)
			if (this.comparador.cumple(attr.getValue()))
				cont++;
		return cont;
	}
	
}
